<?php
$config = array(
    'default' => array
    (
        'type'       => Database::TYPE_MySQL,
        'connection' => array(
            /**
             * The following options are available for MySQL:
             *
             * string   hostname     server hostname, or socket
             * string   database     database name
             * string   username     database username
             * string   password     database password
             * boolean  persistent   use persistent connections?
             *
             * Ports and sockets may be appended to the hostname.
             */
            'hostname'   => array(
/*
 * 若没有开启RDC功能，则用此配置
                # 主数据库
                'master' => 'm'.$_SERVER['HTTP_MYSQLPORT'].'.mysql.sae.sina.com.cn',
                # 从数据库
                'slaver' => array(
                    's'.$_SERVER['HTTP_MYSQLPORT'].'.mysql.sae.sina.com.cn',
                ),
*/
                'master' => 'w.rdc.sae.sina.com.cn',	/*RDC主数据库*/
                'slaver' => array(
                    'r.rdc.sae.sina.com.cn',			/*RDC从数据库*/
                ),
            ),
            'database'   => 'app_' . $_SERVER['HTTP_APPNAME'],
            'username'   => SAE_ACCESSKEY,
            'password'   => SAE_SECRETKEY,
            'persistent' => false,
//            'port'       => $_SERVER['HTTP_MYSQLPORT'],   //非RDC连接时用此
            'port'       => 3307,							//RDC连接时用此
        ),
        'table_prefix' => '',
        'charset'      => 'utf8',
        'caching'      => false,
        'profiling'    => true,
    ),
);